using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TMS.Domain.Entity;

namespace TMS.Infrastructrue.Persistence.Configuration
{
    public class CourseConfiguration : Base.BaseEntityConfiguration<Course>
    {

        public override void Configure(EntityTypeBuilder<Course> builder)
        {
            base.Configure(builder);

            builder.ToTable("course");

            builder.Property(x=>x.CourseText).HasColumnName("course_id").HasMaxLength(200000).HasColumnOrder(1);
            builder.Property(x=>x.ClassId).HasColumnName("class_id").HasMaxLength(200000).HasColumnOrder(2);
            builder.Property(x=>x.TermId).HasColumnName("term_id").HasMaxLength(200000).HasColumnOrder(3);

        }

    }
}